﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace NotepadExpress
{
    public static class MBox
    {

        /// <summary>
        /// Display information dialog
        /// </summary>
        /// <param name="message">Message to display</param>
        /// <param name="title">Dialog title</param>
        public static void Info(string message, string title)
        {
            MessageBox.Show(message, title, MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

        /// <summary>
        /// Display confirmation dialog and return true if confirm
        /// </summary>
        /// <param name="message">Message to display</param>
        /// <param name="title">Dialog title</param>
        /// <returns>True if confirmation is made</returns>
        public static bool Confirm(string message, string title)
        {
            return (DialogResult.Yes == MessageBox.Show(message, title,
                 MessageBoxButtons.YesNo, MessageBoxIcon.Question));
        }
    }
}
